import 'package:json_annotation/json_annotation.dart';

import 'address_entity.dart';

part 'fill_in_order_entity.g.dart';

@JsonSerializable()
class FillInOrderEntity {
  int? grouponRulesId;
  double? actualPrice;
  double? orderTotalPrice;
  int? cartId;
  int? couponId;
  double? goodsTotalPrice;
  int? addressId;
  int? grouponPrice;
  AddressList? checkedAddress;
  double? couponPrice;
  int? availableCouponLength;
  int? freightPrice;
  List<FillInOrderCheckedgoodslist>? checkedGoodsList;

  FillInOrderEntity({
    this.grouponRulesId,
    this.actualPrice,
    this.orderTotalPrice,
    this.cartId,
    this.couponId,
    this.goodsTotalPrice,
    this.addressId,
    this.grouponPrice,
    this.checkedAddress,
    this.couponPrice,
    this.availableCouponLength,
    this.freightPrice,
    this.checkedGoodsList,
  });

  factory FillInOrderEntity.fromJson(Map<String, dynamic> json) => _$FillInOrderEntityFromJson(json);

  Map<String, dynamic> toJson() => _$FillInOrderEntityToJson(this);
}

@JsonSerializable()
class FillInOrderCheckedgoodslist {
  int? productId;
  String? addTime;
  int? goodsId;
  String? goodsSn;
  String? updateTime;
  int? userId;
  List<String>? specifications;
  int? number;
  String? picUrl;
  bool? deleted;
  double? price;
  bool? checked;
  int? id;
  String? goodsName;

  FillInOrderCheckedgoodslist({
    this.productId,
    this.addTime,
    this.goodsId,
    this.goodsSn,
    this.updateTime,
    this.userId,
    this.specifications,
    this.number,
    this.picUrl,
    this.deleted,
    this.price,
    this.checked,
    this.id,
    this.goodsName,
  });

  factory FillInOrderCheckedgoodslist.fromJson(Map<String, dynamic> json) => _$FillInOrderCheckedgoodslistFromJson(json);

  Map<String, dynamic> toJson() => _$FillInOrderCheckedgoodslistToJson(this);
}